<template>
  <el-form :model="ruleForm" :rules="rules" status-icon ref="ruleForm" label-width="0" class="demo-ruleForm el-regForm" size="small">
    <el-form-item prop="tel" >
      <el-input placeholder="请输入手机号码" v-model="ruleForm.tel" class="login-input login-user">
        <i slot="prefix" class="el-shouji iconfont"></i>
      </el-input>
    </el-form-item>
    <el-form-item prop="code" >
      <el-input placeholder="请输入验证码" type="password" v-model="ruleForm.code" class="login-input" prefix-icon="el-yanzhengma iconfont">
          <template slot="append">
              <span @click="sendCode">发送验证码</span>
          </template>
      </el-input>
    </el-form-item>
    <el-form-item>
        <el-button type="primary" class="login-input login-btn" @click="goHome('ruleForm')" round>登 录</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
export default {
  name: "userLogin",
  data() {
    return {
      ruleForm:{
          tel:'',
          code:'',
        },
        rules:{
          tel:[
            {required:true,message:'邮箱不能为空！'},
          ],
          code:[
            {required:true,message:'输入验证码错误！'},
            // {validator:validateCode,trigger:'blur'}
          ],
        },
        identifyCode: "",
        checked: false,
    }
  },
  created() {
    
  },
  
  computed: {
   
  },
 
  methods: {
        goHome(){
          this.$router.push('/wel/index')
        },
        refreshCode(){

        },
        sendCode(){
          
        }
  }
};
</script>

<style scoped>
    .login-input{
        width: 260px;
    }
</style>
